﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace HamcoWcs.DAL.Migrations
{
    public partial class A27 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "OrderNumber",
                table: "pallet_info",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                defaultValue: "",
                comment: "预留单号")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "SetTime",
                table: "device_error_log",
                type: "varchar(50)",
                maxLength: 50,
                nullable: true,
                comment: "恢复时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldComment: "恢复时间")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "OrderNumber",
                table: "pallet_info");

            migrationBuilder.AlterColumn<DateTime>(
                name: "SetTime",
                table: "device_error_log",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
                comment: "恢复时间",
                oldClrType: typeof(string),
                oldType: "varchar(50)",
                oldMaxLength: 50,
                oldNullable: true,
                oldComment: "恢复时间")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }
    }
}
